package design.mode.flyweight.item3;

/**
 * @author ZhongMingde on 2021/11/4
 */

public class CharacterStyle {

  private Font font;
  private int size;
  private int colorRGB;

  public CharacterStyle(Font font, int size, int colorRGB) {
    this.font = font;
    this.size = size;
    this.colorRGB = colorRGB;
  }

  @Override
  public boolean equals(Object o) {
    CharacterStyle otherStyle = (CharacterStyle) o;
    return font.equals(otherStyle.font) && size == otherStyle.size
        && colorRGB == otherStyle.colorRGB;
  }
}
